package com.xingda.packing.dmds.config.appset;

import java.util.Objects;

import com.alibaba.fastjson.JSONObject;

import lombok.extern.slf4j.Slf4j;

/**
 * 读取PLC的配置
 *
 */
@Slf4j
public class AppSetPLC extends JSONObject implements IAppSet{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * PLC连接地址
	 */
	public static String plc_url = "s7://192.168.3.1";
	
	@Override
	public void init() {
		
		log.info("------------------加载AppSetPLC配置------------------");
		String plc_url_init = this.getString("plc_url");
		if (Objects.nonNull(plc_url_init)) {
			plc_url = plc_url_init;
		}
		log.info("PLC连接地址：{}", plc_url);
	}

}
